#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
	if (argc < 2) {
		perror("hole_file <filepath>");
		exit(1);
	}

	int fd = open(argv[1], O_RDWR | O_CREAT);
  	if(fd < 0){
		perror("open");
                exit(1);
	}

	/* make a 5g hole file */
	lseek(fd, 5LL * 1024LL * 1024LL * 1024LL, SEEK_SET);
	write(fd, "", 1);
	
	exit(0);
}
